import request from '@/utils/aliyunRequest';

const sampleApi = {};

sampleApi.exportAvailableNumberList = () => {
	return request({
		url: '/aliyun-api/sample/export-numbers',
		method: 'get',
    responseType: 'blob',
	})
}
sampleApi.sampleChart = (params) => {
	return request({
		url: '/aliyun-api/sample/count-charts',
		method: 'post',
		data: params,
	})
}
sampleApi.setAvailable = (id) => {
	return request({
		url: '/aliyun-api/sample/set-available/' + id,
		method: 'put',
	})
}
sampleApi.mockSyncSample = (id) => {
	return request({
		url: '/aliyun-api/sample/mock-sync/' + id,
		method: 'put',
	})
}

sampleApi.auditSample = (params) => {
	return request({
		url: '/aliyun-api/sample/audit-sample',
		method: 'put',
		data: params,
	})
}

sampleApi.uploadSampleFastq = (params) => {
	return request({
		url: '/aliyun-api/sample/upload-fastq',
		method: 'put',
		data: params,
	})
}
sampleApi.getByStatus = (status) => {
	return request({
		url: '/aliyun-api/sample/list-status/' + status,
		method: 'get',
	})
}
sampleApi.signSample = (number) => {
	return request({
		url: '/aliyun-api/sample/sign-sample/' + number,
		method: 'put',
	})
}
sampleApi.bindSysUser = (params) => {
	return request({
		url: '/aliyun-api/sample/bind-user',
		method: 'put',
		data: params,
	})
}
sampleApi.page = (params) => {
	return request({
		url: '/aliyun-api/sample/page',
		method: 'post',
		data: params,
	})
}
sampleApi.add = (params) => {
	return request({
		url: '/aliyun-api/sample',
		method: 'post',
		data: params,
	})
}
sampleApi.update = (params) => {
	return request({
		url: '/aliyun-api/sample',
		method: 'put',
		data: params,
	})
}
sampleApi.get = (id) => {
	return request({
		url: '/aliyun-api/sample/' + id,
		method: 'get',
	})
}
sampleApi.delete = (id) => {
	return request({
		url: '/aliyun-api/sample/' + id,
		method: 'delete',
	})
}

sampleApi.getFileList = (sampleId) => {
	return request({
		url: '/aliyun-api/sample-file/list/' + sampleId,
		method: 'get',
	})
}
export default sampleApi